//
//  TitleInfoView.swift
//  SlaughterClient
//
//  Created by 邱仙凯 on 2020/2/10.
//  Copyright © 2020 zwb. All rights reserved.
//

import UIKit

class ZyaTitleInfoView: UIView {
    
    @IBOutlet weak var addr: UITextField!
    
    @IBOutlet weak var titleLab: UILabel!
    
}  
 

func getZBJPStatus(listType:TBandJPType,auditmark:Int,status:Int,tbType:ZTBInnerType) -> String {
    
    
    var btnName = ""
    if tbType == .tbMytbKHW {
//        if status == 1 {
//            btnName =  "已开标"
//        } else if status == 0 {
//            btnName =  "未中标"
//        } else {
//            btnName =  "已放弃"
//        }
        
        switch status {
        case 0:
            btnName = "未开始"
//            self.setBtnStyle(color: UIColor(kshex: tenderBlue))
        case 1:
            btnName = listType == .TB ? "已开标" : "已成交"
//            self.setBtnStyle(color: UIColor(kshex: tenderGreen))
        case 2:
            btnName = "进行中"
//            self.setBtnStyle(color: .red)

        case 3:
            btnName = "已结束"
//            self.setBtnStyle(color: UIColor.lightGray)
        case 4:
            btnName = listType == .TB ? "已流标" : "已流拍"
//            self.setBtnStyle(color: UIColor.lightGray)
        default:
            print("33")
        }
        
        
    } else if tbType == .tbRecordKHW {
        if status == 1 {
            btnName =  "已中标"
        } else if status == 0 {
            btnName =  "未中标"
        } else {
            btnName =  "已放弃"
        }
    } else if tbType == .chujiaRecordKHW {
               if status == 1 {
                   btnName =  "已成交"

               } else if status == 0 {
                   btnName =  "未成交"
               } else {
                   btnName =  "已结束"
               }
    } else if tbType == .zbAnnouncementKHW {
        btnName = "已开标"
    } else if tbType == .chujiaRecordJP {
        btnName = "已出价"
    } else if tbType == .cjAnnouncementKHW {
        btnName = "已开拍"
    } else {
        if auditmark == 1 {
            switch status {
            case 0:
                btnName = "未开始"
            case 1:
                btnName = listType == .TB ? "已开标" : "已成交"
            case 2:
                btnName = "进行中"

            case 3:
                btnName = "已结束"
            case 4:
                btnName = listType == .TB ? "已流标" : "已流拍"
            default:
                print("33")
            }
        } else if auditmark == 0 {
            btnName = "未提交"
        } else if auditmark == 2 {
            btnName = "已退回"
        } else if auditmark == 9 {
            btnName = "已提交"
        }
    }
    return btnName
}
